package multithreading;

public class ExtendsThread extends Thread {
    public ExtendsThread() {
    }

    public ExtendsThread(String name) {
        super(name);
    }

    @Override
    public void run() {

        for (int i = 0; i < 10; i++) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println(getName() + "成功" + i);
        }
    }
}
